package org.ecbox.android.demo;

import org.ecbox.android.R;

import android.app.Activity;
import android.os.Bundle;
import android.view.Menu;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.Window;
import android.widget.Button;

public class MainActivity extends Activity implements OnClickListener {

  private Button btn1;

  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    requestWindowFeature(Window.FEATURE_NO_TITLE);
    setContentView(R.layout.main_activity);

    findViewId();
  }

  @Override
  public boolean onCreateOptionsMenu(Menu menu) {
    menu.add("退出");
    return super.onCreateOptionsMenu(menu);
  }

  public void findViewId() {
    btn1 = (Button) findViewById(R.id.button1);
    btn1.setOnClickListener(this);
  }

  @Override
  public void onClick(View v) {
    switch (v.getId()) {
    case R.id.button1:
      break;
    default:
      break;
    }
  }

}
